#include"SLTist.h"

void TestSList1()
{
	SLTNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushFront(&plist, 5);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPopFront(&plist);
	SListPopFront(&plist);
	SListPopBack(&plist);
	SListPrint(plist);

}

void TestSList3()
{
	SLTNode* plist=NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SLTNode* pos = SListFind(plist, 1);
	if (pos)
	{
		SListInsert(&plist,pos, 10);
	}
	SListPrint(plist);
}

void Test4()
{
	SLTNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SLTNode* pos = SListFind(plist, 2);
	if (pos)
	{
		SListErase(&plist, pos);
	}
	SListPrint(plist);
}
int main()
{
 
	//TestSList1();
	//TestSList3();
	Test4();
	return 0;
}